<?php

namespace Home\Model;
use Think\Model;

class ServiceAdModel extends Model {
	// public function __set($name,$value){

	// }

	// public function __get($name){

	// }

	// public function __call($method,$args){

	// }

	// public function __callStatic ($method,$args){

	// }

	// public function __clone(){

	// }

	
	//热门服务商列表获取
	public function ServideAdList($pagesize=3,$page=1){
		$where['ad_disable']=0;
		$where['ad_up_time'] = array('lt',time());
		$where['ad_down_time'] = array('gt',time());
		$list = $this->where($where)->order('ad_sort asc')->limit($pagesize)->select();
		// echo $this->getLastSql();die;
		return $list;
	}

	public function getInfo($uid){
		if(empty($uid) || !is_numeric($uid)) return false;
		$info = $this->where('id='.$uid)->find();
		return $info;
	}


}

?>